/*
day159
2020.2.3
*/
#include<vector>
#include<string>
using namespace std;

class Solution1 {
public:
    bool isSubsequence(string s, string t) 
	{
		if(s.empty())
		{
			return true;
		}
        int index=0;
        for(int i=0;i<t.size();i++)
        {
        	if(t[i]==s[index])
        	{
        		++index;
        		if(index==s.size())
        		{
        			return true;
				}
			}
		}
		return false;
    }
};



class Solution2 {
public:
    bool isSubsequence(string s, string t) {
        int index_s=0,index_t=0;
        while(index_s<s.size() && index_t<t.size())
        {
        	if(s[index_s] == t[index_t])
        	{
        		++index_s;
			}
        	++index_t;
		}
		if(index_s==s.size())
		{
			return true;
		}
		return false;
    }
};
int main()
{
	return 0;
}
